import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:xindong/xindong_yingyong.dart';

import 'common/xindong_all.dart';

// 13005571789
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  // 显示状态栏
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
  // 还原为竖屏功能代码，一般写在 dispose()方法中，页面返回时执行
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);

  // 状态栏透明
  SystemUiOverlayStyle style = const SystemUiOverlayStyle(
    statusBarColor: Colors.transparent,
    systemNavigationBarColor: Colors.transparent,
  );
  SystemChrome.setSystemUIOverlayStyle(style);
  // XinDongAll.instance.isRelease = false;

  // 配置
  Future.wait([XinDongAll.instance.setup()]).then((value) async {
    runApp(const XinDongYingYong());
  });
}
